package com.lrs.java.j2se_self.collection;

import java.util.*;
public class TestSet {
	public static void main(String[] args){
		
		Set s1 = new HashSet();
		Set s2 = new HashSet();
		s1.add(new Name("f1","f2"));
		s1.add("a");
		s1.add("b");
		s1.add("c");
		s2.add("b");
		s2.add("c");
		s2.add("d");
		System.out.println(s1);
		System.out.println(s2);
		Set sn = new HashSet(s1);
		Set su = new HashSet(s1);
		System.out.println(sn);
		sn.retainAll(s2);
		System.out.println(sn);
		su.addAll(s2);
		System.out.println(su);
		
		
	}
	
}
